{	Problem: http://codeforces.ru/problemset/problem/49/A
	Verdict: Accepted

}
const v:set of char=['A', 'E', 'I', 'O', 'U', 'Y'];
var s:string; i:longint;
begin
readln(s);
i:=length(s);
while (not(s[i] in ['A'..'Z'])) and  (not(s[i] in ['a'..'z'])) do dec(i);
if (chr(ord(s[i])-32) in v) or (s[i] in v) then writeln('YES') else writeln('NO');
end.